package com.aoyy.action;

import java.util.List;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import com.aoyy.model.ProductType;
/**========================================================
 * <code>IndexAction</code> action for index action
 * @author Administrator
 * @date 2017-07-13
 * ======================================================== */
@Scope("prototype")
@Controller("indexAction")
public class IndexAction extends BaseAction {
  private static final long serialVersionUID = -4262338093543988064L;
  private List<ProductType> productTypes;
  
  public void setProductTypes(List<ProductType> productTypes) {
	this.productTypes = productTypes;
  }
  public List<ProductType> getProductTypes() {
	return productTypes;  
  }
  
  @Override
  public String execute() {
	String where = "where parent is null";
	productTypes = productTypeDao.query(where, null, -1, -1).getList();
	return SUCCESS;  
  }
 
}
